package com.littcore.saap.system.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

import java.io.Serializable;

/**
 * <br>
 * Table:permission<br>
 * @author Hibernate Tools 3.4.0.CR1
 * @version 1.0
 * @since Dec 8, 2015 4:27:59 PM
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Table(name = "permission")
public class Permission implements Serializable {
	/**
	 * UID
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 序号.
	 */
	private Integer id;

	/**
	 * 权限编号
	        资源编号（模块+功能点）.
	 */
	private String permissionCode;

	/**
	 * 功能点ID.
	 */
	private int funcId;

	/**
	 * 模块ID.
	 */
	private int moduleId;

	public Permission() {
	}

	public Permission(String permissionCode, int funcId, int moduleId) {
		this.permissionCode = permissionCode;
		this.funcId = funcId;
		this.moduleId = moduleId;
	}

	/**  
	 * Get 序号.
	 * @return 序号
	 */
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	/**
	 * Set 序号.
	 * @param id 序号
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**  
	 * Get 权限编号
	        资源编号（模块+功能点）.
	 * @return 权限编号
	        资源编号（模块+功能点）
	 */

	@Column(name = "PERMISSION_CODE", nullable = false, length = 50)
	public String getPermissionCode() {
		return this.permissionCode;
	}

	/**
	 * Set 权限编号
	        资源编号（模块+功能点）.
	 * @param permissionCode 权限编号
	        资源编号（模块+功能点）
	 */
	public void setPermissionCode(String permissionCode) {
		this.permissionCode = permissionCode;
	}

	/**  
	 * Get 功能点ID.
	 * @return 功能点ID
	 */

	@Column(name = "FUNC_ID", nullable = false)
	public int getFuncId() {
		return this.funcId;
	}

	/**
	 * Set 功能点ID.
	 * @param funcId 功能点ID
	 */
	public void setFuncId(int funcId) {
		this.funcId = funcId;
	}

	/**  
	 * Get 模块ID.
	 * @return 模块ID
	 */

	@Column(name = "MODULE_ID", nullable = false)
	public int getModuleId() {
		return this.moduleId;
	}

	/**
	 * Set 模块ID.
	 * @param moduleId 模块ID
	 */
	public void setModuleId(int moduleId) {
		this.moduleId = moduleId;
	}

}
